package com.ktjy.springthymeleaf.service.impl;

import com.ktjy.springthymeleaf.entity.Role;
import com.ktjy.springthymeleaf.mapper.RoleMapper;
import com.ktjy.springthymeleaf.service.RoleService;
import jakarta.annotation.Resource;
import org.apache.ibatis.annotations.Mapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @return 13141
 * 2025/7/14
 * 17:12
 */
@Service("roleService")
public class RoleServiceImpl implements RoleService {
    private static final Logger LOGGER = LoggerFactory.getLogger(RoleServiceImpl.class);
    @Resource
    private RoleMapper roleMapper;
    @Override
    public int insert(Role role) {
        return roleMapper.insert(role);
    }

    @Override
    public int delete(Long id) {
        return roleMapper.delete(id);
    }

    @Override
    public int update(Role role) {
        return roleMapper.update(role);
    }

    @Override
    public Role get(Long id) {
        return roleMapper.get(id);
    }

    @Override
    public List<Role> findAll() {
        return roleMapper.findAll();
    }
}
